#ifndef GLSCANPROGRAM_H
#define GLSCANPROGRAM_H

#include <QOpenGLShaderProgram>
#include <QOpenGLShader>
#include <QHash>
#include <QVector>
#include "AreaTest/ServerDefine.h"
#include "AreaTest/glserver.h"

class glscanprogram : public QOpenGLShaderProgram
{
public:
    glscanprogram(const QString &vertex, const QString &fragment, QObject *parent = nullptr);
    ~glscanprogram();
    virtual void setLocation();

    int getLocation(const QString &key);
    int getScanVertexSize();
    const GLfloat *getScanVertexData();

private:
    QOpenGLShader *vShader;
    QOpenGLShader *fShader;
    QHash<QString, int> locationHash;
    GLfloat *renderData;
};

#endif // GLSCANPROGRAM_H
